package com.example.springboot0811.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.data.ConditionalOnRepositoryType;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@PropertySource(value = "classpath:application.properties",encoding = "utf-8")
public class TestController {

    @Value("${myimage.path}")
    private String myImage;

    @RequestMapping("/sayhi")
    public String sayHi() {
        return "你好，springboot ->" + myImage;
    }
}
